import React from 'react';
import {View, StyleSheet, NativeModules} from 'react-native';
import {connectActionSheet} from '@expo/react-native-action-sheet';
import Geolocation from '@react-native-community/geolocation';

class ExampleScreen extends React.PureComponent {
  state = {
    selectedLanguage: '',
  };

  componentDidMount() {
    /**
    {
      "coords": {
      "accuracy": 55.092132568359375,
          "altitude": 0,
          "heading": 0,
          "latitude": 30.633917,
          "longitude": 113.16945,
          "speed": 0
    },
      "mocked": false,
        "timestamp": 1624426497693
    }
     **/
    // Geolocation.setRNConfiguration({
    //   skipPermissionRequests: false,
    //   authorizationLevel: 'whenInUse',
    // });
    // Geolocation.getCurrentPosition(info => console.log(info));
    // console.log(NativeModules);
  }

  render() {
    return <View style={styles.container} />;
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    padding: 24,
    backgroundColor: 'white',
  },
  contentContainer: {
    backgroundColor: 'white',
  },
  itemContainer: {
    padding: 6,
    margin: 6,
    backgroundColor: '#eee',
  },
  row: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
  },
  block: {
    flex: 1,
  },
});

export default connectActionSheet(ExampleScreen);
